﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;

using Data = VietStar.Library.Data;
using Entity = VietStar.Library.Entity;

namespace VietStar.Library.Business
{
    public class Banner
    {
        public Banner() { }
        Data.Banner banner = new Data.Banner();

        //Thêm banner
        public bool Insert(Entity.Banner entity)
        {
            return banner.Insert(entity);
        }
        //Load tất cả banner
        public DataTable Select()
        {
            return banner.Select();
        }        

        //Load banner theo Id
        public DataTable SelectPrimaryKey(Entity.Banner entity)
        {
            return banner.SelectPrimaryKey(entity);
        }

        //Load banner theo vị trí banner
        public DataTable SelectByViTriBanner(Entity.Banner entity)
        {
            return banner.SelectByViTriBanner(entity);
        }
        //Load banner theo vị trí banner và theo người đăng
        public DataTable SelectByViTriBannerByUsername(Entity.Banner entity)
        {
            return banner.SelectByViTriBannerByUsername(entity);
        }
        //Load banner theo người đăng
        public DataTable SelectByUsername(Entity.Banner entity)
        {
            return banner.SelectByUsername(entity);
        }

        //Load banner dùng ngoài templates
        public DataTable SelectBannerTemplates(Entity.Banner entity)
        {
            return banner.SelectBannerTemplates(entity);
        }

        //Cập nhật banner
        public bool Update(Entity.Banner entity)
        {
            return banner.Update(entity);
        }

        //Xóa banner
        public bool Delete(Entity.Banner entity)
        {
            return banner.Delete(entity);
        }       
    }
}
